package com.gxc.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.context.annotation.Configuration;

/**
 * 拦截器的切面.
 *
 * @author 宫新程
 * @since 2018/12/29 5:14 PM
 */
@Aspect
@Configuration
public class ControllerAspect {

  /** 对RequestInterceptor中的所有方法的增强. */
  @Around("@within(org.springframework.stereotype.Controller)")
  public Object filterAspect(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
    System.out.println("=======================================");
    Object proceed = proceedingJoinPoint.proceed();
    System.out.println("=======================================");
    return proceed;
  }
}
